﻿// Decompiled with JetBrains decompiler
// Type: Microsoft.InfoCards.KeyBlock
// Assembly: infocard, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
// MVID: 8E14765A-6610-409A-BA36-099A0642905D
// Assembly location: E:\git\ALLIDA\windll\infocard.exe

using System.Runtime.InteropServices;

namespace Microsoft.InfoCards
{
  [StructLayout(LayoutKind.Explicit, Size = 592)]
  internal struct KeyBlock
  {
    public const int StructSize = 592;
    public const int EncryptedKeyBlockSize = 512;
    public const int Pkcs5IVBlockSize = 32;
    public const int SaltBlockSize = 32;
    public const int IVOffset = 0;
    public const int SaltOffset = 32;
    public const int IterationCountOffset = 64;
    public const int EncryptedKeySizeOffset = 68;
    public const int EncryptedKeyOffset = 72;
    public const int ReservedPaddingOffset = 584;
    public const int KeyTypeOffset = 588;
    [MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)]
    [FieldOffset(0)]
    public byte IV;
    [MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)]
    [FieldOffset(32)]
    public byte Salt;
    [MarshalAs(UnmanagedType.I4)]
    [FieldOffset(64)]
    public int IterationCount;
    [MarshalAs(UnmanagedType.I4)]
    [FieldOffset(68)]
    public int EncryptedKeySize;
    [MarshalAs(UnmanagedType.ByValArray, SizeConst = 512)]
    [FieldOffset(72)]
    public byte EncryptedKey;
    [MarshalAs(UnmanagedType.I4)]
    [FieldOffset(584)]
    private int ReservedPadding;
    [MarshalAs(UnmanagedType.I4)]
    [FieldOffset(588)]
    public int KeyType;
  }
}
